<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div class="root">
        <div class="item"> 1 </div>
        <div class="item"> 2 </div>
        <div class="item"> 3 </div>
    </div>
</body>

<style>
    .root{
        width: 500px;
        height: 500px;
        border: 1px solid lightgray;
        margin-top: 50px;
        margin-left: 50px;
        display: flex;
        /* 主轴方向 main start -> main end */
        /* xxx-reveres 只是元素的排序是顺序还是倒序 */
        /* row、 column、 row-reveres、 column-reverse */
        flex-direction: column; 
        flex-wrap: wrap;

        /* 主轴对齐方式 
           start、end、center、space-between、
           space-around、space-evenly、stretch(不应该用在主轴对齐方式上)
        */
        justify-content: start; 
        /* 交叉轴对齐方式(单行)
           start、end、center、space-between、
           space-around、space-evenly、stretch(交叉轴方向的size为auto)
        */
        align-items: center;
    }
    .item{
        width: 100px;
        height: 100px;
        text-align: center;
    }
    .item:nth-of-type(1){
        background: red;
    }
    .item:nth-of-type(2){
        background: green;
    }
    .item:nth-of-type(3){
        background: blue;
    }
</style>
    

</html>